package com.iot08.api.controller;

import com.iot08.api.annotation.CheckAppSign;
import com.iot08.api.controller.base.BaseController;
import com.iot08.api.service.UserGoldCoinService;
import com.iot08.api.vo.request.UserGoldCoinQueryReqVo;
import com.iot08.api.vo.request.base.BaseAccountReqVO;
import com.iot08.common.utils.response.ResponseMap;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @author cwj
 * @description
 * @date 2025/3/7 15:05
 **/
@Slf4j
@RestController
@RequestMapping("getway/userGoldCoin")
public class UserGoldCoinController extends BaseController {

    @Resource
    private UserGoldCoinService userGoldCoinService;

    /**
     * @description 查询用户金币信息
     * @author cwj
     * @param [vo]
     * @return com.iot08.common.utils.response.ResponseMap
     * @date @time 2025/3/7 15:07
     **/
    @PostMapping("/query")
    @CheckAppSign
    public ResponseMap queryUserGoldCoin(@Validated @RequestBody UserGoldCoinQueryReqVo vo) {
        return userGoldCoinService.queryUserGoldCoin(vo.getBodyForm().getOpenid());
    }

}
